home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1996 #4 / Amiga Plus CD - 1996 - No. 4.iso / pd / daten / vcarchive_v3.23 / untitled iii.install < prev    next >
Text File  |  1996-02-26  |  13KB  |  487 lines

  1. ; *************************************************************************
  2. ; ******************  Untitled III Installation Script  *******************
  3. ; *************************************************************************
  4. ;
  5. ; $VER: Untitled III.install 1.4 (22.02.96)
  6. ;
  7. ; Copyright ©1996 Harald Zottmann
  8. ;
  9. ; *************************************************************************
  10. ;
  11.  
  12.  
  13. ; ------------------------------------------------------------------------
  14. ; Find out about program version
  15.  
  16.     (set vernum-vca    (getversion "Untitled"))
  17.     (set version-vca   (/ vernum-vca 65536))
  18.     (set revision-vca  (- vernum-vca (* version-vca 65536) ) )
  19.  
  20. ; ------------------------------------------------------------------------
  21. ; Set default destination directory
  22.  
  23.     (set def-vca-dir "SYS:")
  24.  
  25. ; ------------------------------------------------------------------------
  26. ; Set default language
  27.  
  28.     (set default_lang 1)
  29.  
  30. ; ------------------------------------------------------------------------
  31. ; Init some strings
  32.  
  33.     (set #yes-msg "Yes")
  34.     (set #no-msg "No")
  35.  
  36.     (set #new-msg "New Requester Look")
  37.     (set #old-msg "Old Requester Look")
  38.  
  39.     (set #mc-msg "MC - Music Cassettes")
  40.     (set #cd-msg "CD - Compact Discs")
  41.     (set #phono-msg "Phono - Longplayers")
  42.     (set #video-msg "Video - Video Tapes")
  43.  
  44.     (set #bad-kick-msg 
  45.         "Untitled III requires AmigaOS 2.04 or better !"
  46.     )
  47.  
  48.     (set #hello-msg
  49.         (cat
  50.         ("Welcome to Untitled V%ld.%ld\n\n" version-vca revision-vca)
  51.         "This script will install Untitled III and "
  52.         "related files on your Amiga.\n\n"
  53.         "You will need to answer a few questions such as "
  54.         "where you would like the program installed.\n\n"
  55.         "If you do not wish to install Untitled at this time, "
  56.         "select the 'Abort Install' button now. "
  57.         )
  58.     )
  59.  
  60.     (set #goodbye-msg
  61.         (cat
  62.         "The installation of Untitled III is now complete. "
  63.         "Have a look at the guides to get more information "
  64.         "about this powerful tool. If you have TeX installed "
  65.         "on your Amiga, you can print the DVI-file with the "
  66.         "complete program description.\n\n"
  67.         "Don`t forget to register if you use Untitled III "
  68.         "frequently. See the docs for more information.\n\n"
  69.         "Have fun..."
  70.         )
  71.     )
  72.  
  73.     (set #shortbye-msg
  74.         (cat
  75.         "Don`t forget to register if you use Untitled III "
  76.         "frequently. See the docs for more information.\n\n"
  77.         "Have fun..."
  78.         )
  79.     )
  80.  
  81.     (set #vca-askdir-msg 
  82.         (cat
  83.         "Select the directory to install Untitled III in. "
  84.         "If you want to create a new directory for this "
  85.         "application, do so now.\n"
  86.         )
  87.     )
  88.  
  89.     (set #processor-msg
  90.         (cat
  91.         "Untitled III is optimized for the listed "
  92.         "processor types. Please indicate "
  93.         "which processor you have in your machine."
  94.         "\n--------------------------\n"
  95.         "The Installer found out that you have a\n"
  96.         "MC " (database "cpu") " CPU\n"
  97.         )
  98.     )
  99.  
  100.     (set #processor-help
  101.         (cat
  102.         "There are three optimized versions of "
  103.         "Untitled III available. "
  104.         "Simply specify the processor (CPU) of your machine. "
  105.         "For example if you have a stock A1200 or "
  106.         "A4000/030, choose MC 68020. For an A4000/040 "
  107.         "you may choose MC 68040. Older machines without "
  108.         "accelerator boards, like A500 or A2000 must "
  109.         "choose the MC 68000. "
  110.         "The Installer program however found out that "
  111.         "your machine is equipped with a MC "
  112.         (database "cpu") " CPU. "
  113.         "If you are not sure about that, choose the "
  114.         "MC 68000 version, that runs on every machine."
  115.         )
  116.     )
  117.  
  118.     (set #locale-msg
  119.         (cat
  120.         "Untitled III is localized and has been translated "
  121.         "into the following languages. Please indicate "
  122.         "which translation you wish to install.\n"
  123.         )
  124.     )
  125.  
  126.     (set #locale-help
  127.         (cat
  128.         "English and Deutsch are the languages which are "
  129.         "supported by Untitled III. "
  130.         "Simply specify the language you prefer. "
  131.                 "You can change your selection later, "
  132.                 "by modifying the corresponding Tooltype. "
  133.         "The AmigaGuide files for Untitled III will "
  134.         "be present for both languages, regardless of "
  135.         "your present selection."
  136.         )
  137.     )
  138.  
  139.     (set #examples-msg
  140.         (cat
  141.         "Untitled III comes with several example files. "
  142.         "Please select whether you want them to be "
  143.         "installed for training purposes. "
  144.         "You can delete them later, if you want.\n"
  145.         "Note that already existing data files will not be "
  146.         "overwritten by the installation script.\n"
  147.         )
  148.     )
  149.  
  150.     (set #examples-help
  151.         (cat
  152.         "These files provide some examples on how to "
  153.         "work with Untitled III. If you have a "
  154.         "previous version of Untitled III installed "
  155.         "and this is only an update, you should not "
  156.         "install these examples. "
  157.         )
  158.     )
  159.  
  160.     (set #su-mode-msg
  161.         (cat
  162.         "\Untitled III manages your MCs, CDs, "
  163.         "Longplayers and Videos. Please select the "
  164.         "default mode of Untitled III on program start. "
  165.         "You can change this selection later, if you want.\n"
  166.         )
  167.     )
  168.  
  169.     (set #su-mode-help
  170.         (cat
  171.         "This option gives you the choice between the four "
  172.         "different modes (MC, CD, Phono, Video) of Untitled III. "
  173.         "The selected mode will be invoked on every program start, "
  174.         "but you can alter the mode during run time, whenever you want. "
  175.         "If you are not sure, the best decision is to "
  176.         "select the mode which you intend to use most often. "
  177.         )
  178.     )
  179.  
  180.     (set #su-req-msg
  181.         (cat
  182.         "Untitled III provides two different requester styles. "
  183.         "The new OS2.x requester look and an old internal one. "
  184.         "The advantage of the old one is, that you can "
  185.         "confirm it with the <RETURN> key, and cancel it "
  186.         "with the <ESCAPE> key. The new one however looks much neater.\n"
  187.         )
  188.     )
  189.  
  190.     (set #su-req-help
  191.         (cat
  192.         "This option gives you the choice between two "
  193.         "different requester styles. "
  194.         "If you are not sure, select the new one. "
  195.         "You can change this selection later, if you want.\n"
  196.         )
  197.     )
  198.  
  199.  
  200. ; ************************************************************************
  201. ; Begin actual installation
  202. ; ************************************************************************
  203.  
  204. ; ------------------------------------------------------------------------
  205. ; Check for KickV37 or better
  206.  
  207.     (if (< (/ (getversion) 65536) 37)
  208.         (
  209.         (abort #bad-kick-msg)
  210.         )
  211.     )
  212.  
  213.  
  214. ; ------------------------------------------------------------------------
  215. ; Print the welcome message
  216.  
  217.     (message #hello-msg)
  218.  
  219.  
  220. ; ------------------------------------------------------------------------
  221. ; Ask the user where we should install Untitled III.
  222.  
  223.     (if (= 0 @user-level)
  224.         (
  225.         (set vcadir        (tackon @default-dest "VCArchive") )
  226.         (set @default-dest vcadir)
  227.         (makedir vcadir)
  228.         (copyfiles (source "/VCArchive") (dest vcadir) (infos) (all))
  229.         (exit (#shortbye-msg)) 
  230.         )
  231.     )
  232.  
  233.  
  234.     (set vcadir
  235.         (askdir
  236.             (prompt #vca-askdir-msg)
  237.             (help @askdir-help)
  238.             (default def-vca-dir)
  239.         )
  240.     )
  241.  
  242.     (set @default-dest vcadir)
  243.  
  244. ; ------------------------------------------------------------------------
  245. ; Ask which processor version to be installed.
  246.  
  247.     (set procversion
  248.         (askchoice
  249.             (prompt #processor-msg)
  250.             (help #processor-help)
  251.             (choices
  252.                 "MC 68000"
  253.                 "MC 68020"
  254.                 "MC 68040"
  255.             )
  256.             (default 0)
  257.         )
  258.     )
  259.     (if (= 0 procversion)
  260.         ((copyfiles (source "Untitled") (dest vcadir) (infos))
  261.         )
  262.     )
  263.     (if (= 1 procversion)
  264.         ((copyfiles (source "Untitled_020")  (dest vcadir))
  265.          (copyfiles (source "Untitled.info") (dest vcadir))
  266.          (rename (tackon vcadir "Untitled_020") (tackon vcadir "Untitled"))
  267.         )
  268.     )
  269.     (if (= 2 procversion)
  270.         ((copyfiles (source "Untitled_040")  (dest vcadir))
  271.          (copyfiles (source "Untitled.info") (dest vcadir))
  272.          (rename (tackon vcadir "Untitled_040") (tackon vcadir "Untitled"))
  273.         )
  274.     )
  275.  
  276. ; ------------------------------------------------------------------------
  277. ; Check if there are old configurations.
  278.  
  279.     (if (NOT(exists (tackon vcadir "VCA.CFG") ) )
  280.         (copyfiles (source "VCA.CFG") (dest vcadir) )
  281.     )
  282.     (if (NOT(exists (tackon vcadir "VCA.FNK") ) )
  283.         (copyfiles (source "VCA.FNK") (dest vcadir) )
  284.     )
  285.  
  286.  
  287.  
  288.     (copyfiles (source "VCA_E.guide") (dest vcadir) (infos) )
  289.     (copyfiles (source "VCA_D.guide") (dest vcadir) (infos) )
  290.  
  291.  
  292.  
  293.     (set toolsdrw (tackon vcadir "Tools"))
  294.     (makedir toolsdrw)
  295.     (copyfiles (source "Tools.info") (dest vcadir) )
  296.  
  297.     (copyfiles (source "Tools/VideoCounter")  (dest toolsdrw) (infos) )
  298.     (copyfiles (source "Tools/Backup")        (dest toolsdrw) (infos) )
  299.     (copyfiles (source "Tools/Restore")       (dest toolsdrw) (infos) )
  300.     (copyfiles (source "Tools/Requester")     (dest toolsdrw) )
  301.     (copyfiles (source "Tools/FUnCopy")       (dest toolsdrw) )
  302.  
  303.  
  304.  
  305.     (set docsdrw (tackon vcadir "Docs"))
  306.     (makedir docsdrw)
  307.     (copyfiles (source "Docs.info") (dest vcadir) )
  308.  
  309.     (copyfiles (source "Docs/VCA_E.dvi")      (dest docsdrw) (infos) )
  310.     (copyfiles (source "Docs/VCA_E.doc")      (dest docsdrw) (infos) )
  311.     (copyfiles (source "Docs/VCA.ReadMe")     (dest docsdrw) (infos) )
  312.  
  313.     (copyfiles (source "Docs/VCA_D.dvi")      (dest docsdrw) (infos) )
  314.     (copyfiles (source "Docs/VCA_D.doc")      (dest docsdrw) (infos) )
  315.     (copyfiles (source "Docs/VCA.LiesMich")   (dest docsdrw) (infos) )
  316.  
  317.     (copyfiles (source "Docs/ORDERFORM.TXT")     (dest docsdrw) (infos) )
  318.     (copyfiles (source "Docs/REGISTRIERUNG.TXT") (dest docsdrw) (infos) )
  319.     (copyfiles (source "Docs/HISTORY.TXT")       (dest docsdrw) (infos) )
  320.     (copyfiles (source "Docs/DISCLAIMER.TXT")    (dest docsdrw) (infos) )
  321.  
  322.  
  323. ; ------------------------------------------------------------------------
  324. ; Ask which built in language should be invoked for Untitled III.
  325.  
  326.     (set lang
  327.         (askchoice
  328.             (prompt #locale-msg)
  329.             (help #locale-help)
  330.             (choices
  331.                 "English"
  332.                 "Deutsch"
  333.             )
  334.             (default default_lang)
  335.         )
  336.     )
  337.     (if (= 0 lang)
  338.         (tooltype
  339.             (dest (tackon vcadir "Untitled"))
  340.             (settooltype "LANGUAGE" "1")
  341.         )
  342.     )
  343.     (if (= 1 lang)
  344.         (tooltype
  345.             (dest (tackon vcadir "Untitled"))
  346.             (settooltype "LANGUAGE" "0")
  347.         )
  348.     )
  349.  
  350. ; ------------------------------------------------------------------------
  351. ; Update from a version, previous to Untitled Version 3.0
  352.  
  353.         (if (exists (tackon vcadir "Ordner_1") )
  354.             (rename (tackon vcadir "Ordner_1") (tackon vcadir "MC_Ordner_1") )
  355.         
  356.         )
  357.         (if (exists (tackon vcadir "Ordner_2") )
  358.             (rename (tackon vcadir "Ordner_2") (tackon vcadir "MC_Ordner_2") )
  359.         
  360.         )
  361.         (if (exists (tackon vcadir "Ordner_3") )
  362.             (rename (tackon vcadir "Ordner_3") (tackon vcadir "MC_Ordner_3") )
  363.         
  364.         )
  365.         (if (exists (tackon vcadir "Ordner_1.List") )
  366.             (rename (tackon vcadir "Ordner_1.List") (tackon vcadir "MC_Ordner_1.Liste") )
  367.         
  368.         )
  369.         (if (exists (tackon vcadir "Ordner_2.List") )
  370.             (rename (tackon vcadir "Ordner_2.List") (tackon vcadir "MC_Ordner_2.Liste") )
  371.         
  372.         )
  373.         (if (exists (tackon vcadir "Ordner_3.List") )
  374.             (rename (tackon vcadir "Ordner_3.List") (tackon vcadir "MC_Ordner_3.Liste") )
  375.         
  376.         )
  377.  
  378. ; ------------------------------------------------------------------------
  379. ; Ask whether examples should be installed
  380.  
  381.     (set examples
  382.         (askchoice
  383.             (prompt #examples-msg)
  384.             (help #examples-help)
  385.             (choices
  386.                 #yes-msg
  387.                 #no-msg
  388.             )
  389.             (default 0)
  390.         )
  391.     )
  392.     (if (= 0 examples)
  393.         ( 
  394.         (if (NOT(exists (tackon vcadir "MC_Ordner_1") ) )
  395.             ( (copyfiles (source "MC_Ordner_1")       (dest vcadir) )
  396.                 (copyfiles (source "MC_Ordner_1.Liste") (dest vcadir) )
  397.             )
  398.  
  399.         )
  400.         (if (NOT(exists (tackon vcadir "CD_Ordner_1") ) )
  401.               ( (copyfiles (source "CD_Ordner_1")       (dest vcadir) )
  402.                 (copyfiles (source "CD_Ordner_1.Liste") (dest vcadir) )
  403.             )
  404.         )
  405.         (if (NOT(exists (tackon vcadir "Phono_Ordner_1") ) )
  406.               ( (copyfiles (source "Phono_Ordner_1")       (dest vcadir) )
  407.                 (copyfiles (source "Phono_Ordner_1.Liste") (dest vcadir) )
  408.             )
  409.         )
  410.         (if (NOT(exists (tackon vcadir "Video_Ordner_1") ) )
  411.               ( (copyfiles (source "Video_Ordner_1")       (dest vcadir) )
  412.                 (copyfiles (source "Video_Ordner_1.Liste") (dest vcadir) )
  413.             )
  414.         )
  415.         )
  416.     )
  417.  
  418. ; ------------------------------------------------------------------------
  419. ; Ask for startup mode
  420.  
  421.     (set su-mode
  422.         (askchoice
  423.             (prompt #su-mode-msg)
  424.             (help #su-mode-help)
  425.             (choices
  426.                 #mc-msg
  427.                 #cd-msg
  428.                 #phono-msg
  429.                 #video-msg
  430.             )
  431.             (default 0)
  432.         )
  433.     )
  434.     (if (= 0 su-mode)
  435.         (tooltype
  436.             (dest (tackon vcadir "Untitled"))
  437.             (settooltype "MODUS" "1")
  438.         )
  439.  
  440.     )
  441.     (if (= 1 su-mode)
  442.         (tooltype
  443.             (dest (tackon vcadir "Untitled"))
  444.             (settooltype "MODUS" "2")
  445.         )
  446.  
  447.     )
  448.     (if (= 2 su-mode)
  449.         (tooltype
  450.             (dest (tackon vcadir "Untitled"))
  451.             (settooltype "MODUS" "3")
  452.         )
  453.  
  454.     )
  455.     (if (= 3 su-mode)
  456.         (tooltype
  457.             (dest (tackon vcadir "Untitled"))
  458.             (settooltype "MODUS" "4")
  459.         )
  460.  
  461.     )
  462.  
  463. ; ------------------------------------------------------------------------
  464. ; Ask for requester style
  465.  
  466.     (set su-req
  467.         (askchoice
  468.             (prompt #su-req-msg)
  469.             (help #su-req-help)
  470.             (choices
  471.                 #new-msg
  472.                 #old-msg
  473.             )
  474.             (default 0)
  475.         )
  476.     )
  477.     (if (= 0 su-req)
  478.         (tooltype (dest (tackon vcadir "Untitled")) (settooltype "STYLE" "1") )
  479.         (tooltype (dest (tackon vcadir "Untitled")) (settooltype "STYLE" "0") )
  480.     )
  481.  
  482. ; ------------------------------------------------------------------------
  483. ; Print the goodbye message
  484.  
  485.     (message #goodbye-msg)
  486.  
  487.